package dndapplication.data;

import java.util.Random;

public class RollCheck {

    public static int roll(int numberOfSides, int numberOfDice) {
    	Random aRandom = new Random();
        int sum = 0;
        for (int dieNumber = 0; dieNumber < numberOfDice; dieNumber++) {
            sum = sum + ((int) ((numberOfSides - 1) * aRandom.nextDouble())) + 1;
        }
        return sum;
    }

	
}
